#include"stdio.h"
#include"stdlib.h"

typedef char datatype;
typedef struct TNode{
	datatype data;
	struct TNode *leftchild;
	struct TNode *rightchild;
}TNode;

void init(TNode *t,datatype x){
	t->data=x;
	t->leftchild=(TNode *)malloc(sizeof(TNode));
	t->rightchild=(TNode *)malloc(sizeof(TNode));
	t->leftchild=NULL;
	t->rightchild=NULL;
}
void creatnodes(TNode *t){
	
	char ch;
      scanf("%c",&ch);
      if(ch=='#')
          t=NULL;
	
	else
     {
         t=(TNode *)malloc(sizeof(TNode));
         if(!t)
             exit(-1);
          (t)->data=ch;
          creatnodes(t->leftchild);
         creatnodes(t->rightchild);
      }
	
	
}


void main(){
	TNode * t=(TNode *)malloc(sizeof(TNode));
	init(t,0);
	//creatnodes(t);
}
